package cn.jiyun.controller;

import cn.jiyun.entitty.Result;
import cn.jiyun.entitty.Traing;
import cn.jiyun.service.TraingService;
import cn.jiyun.service.TraingFenigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @Author weiyuanhang
 * @data: 2023/8/24 002416:57
 * @Package cn.jiyun.controller
 * @email 3185757326@qq.com
 */
@RestController
@RequestMapping("/myTraing")
public class TraingController {
    @Autowired
    private TraingService traingService;
    @Autowired
    private TraingFenigService traingFenigService;

    @GetMapping("/findTraing")
    public List<Traing>findTraing(){
        return traingFenigService.findDescTring();
    }

    @RequestMapping("/findTraingDate")
    public Result findTraingDate(){
        return Result.ok(traingFenigService.findZhDate());
    }
}
